home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
PC World Komputer 2010 April
/
PCWorld0410.iso
/
hity wydania
/
Ubuntu 9.10 PL
/
karmelkowy-koliberek-9.10-netbook-remix-PL.iso
/
casper
/
filesystem.squashfs
/
usr
/
share
/
system-config-printer
/
debug.pyc
(
.txt
)
< prev
next >
Wrap
Python Compiled Bytecode
|
2009-10-28
|
2KB
|
48 lines
# Source Generated with Decompyle++
# File: in.pyc (Python 2.6)
import sys
import traceback
_debug = False
def debugprint(x):
if _debug:
try:
print >>sys.stderr, x
def get_debugging():
return _debug
def set_debugging(d):
global _debug
_debug = d
def fatalException(exitcode = 1):
nonfatalException(type = 'fatal', end = 'Exiting')
sys.exit(exitcode)
def nonfatalException(type = 'non-fatal', end = 'Continuing anyway..'):
d = get_debugging()
set_debugging(True)
debugprint('Caught %s exception. Traceback:' % type)
(type, value, tb) = sys.exc_info()
tblast = traceback.extract_tb(tb, limit = None)
if len(tblast):
tblast = tblast[:len(tblast) - 1]
extxt = traceback.format_exception_only(type, value)
for line in traceback.format_tb(tb):
debugprint(line.strip())
debugprint(extxt[0].strip())
debugprint(end)
set_debugging(d)